package com.ruoyi.wb.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.wb.service.IWbUserEntAuthService;
import com.ruoyi.wb.domain.WbUserEntAuth;
import com.ruoyi.wb.mapper.WbUserEntAuthMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 登录用户和认证企业关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-17
 */
@Service
public class WbUserEntAuthServiceImpl implements IWbUserEntAuthService 
{
    @Autowired
    private WbUserEntAuthMapper wbUserEntAuthMapper;

    /**
     * 查询登录用户和认证企业关联
     * 
     * @param id 登录用户和认证企业关联主键
     * @return 登录用户和认证企业关联
     */
    @Override
    public WbUserEntAuth selectWbUserEntAuthById(Long id)
    {
        return wbUserEntAuthMapper.selectWbUserEntAuthById(id);
    }

    /**
     * 查询登录用户和认证企业关联列表
     * 
     * @param wbUserEntAuth 登录用户和认证企业关联
     * @return 登录用户和认证企业关联
     */
    @Override
    public List<WbUserEntAuth> selectWbUserEntAuthList(WbUserEntAuth wbUserEntAuth)
    {
        return wbUserEntAuthMapper.selectWbUserEntAuthList(wbUserEntAuth);
    }

    /**
     * 新增登录用户和认证企业关联
     * 
     * @param wbUserEntAuth 登录用户和认证企业关联
     * @return 结果
     */
    @Override
    public int insertWbUserEntAuth(WbUserEntAuth wbUserEntAuth)
    {
        wbUserEntAuth.setCreateTime(DateUtils.getNowDate());
        return wbUserEntAuthMapper.insertWbUserEntAuth(wbUserEntAuth);
    }

    /**
     * 修改登录用户和认证企业关联
     * 
     * @param wbUserEntAuth 登录用户和认证企业关联
     * @return 结果
     */
    @Override
    public int updateWbUserEntAuth(WbUserEntAuth wbUserEntAuth)
    {
        wbUserEntAuth.setUpdateTime(DateUtils.getNowDate());
        return wbUserEntAuthMapper.updateWbUserEntAuth(wbUserEntAuth);
    }

    /**
     * 批量删除登录用户和认证企业关联
     * 
     * @param ids 需要删除的登录用户和认证企业关联主键
     * @return 结果
     */
    @Override
    public int deleteWbUserEntAuthByIds(Long[] ids)
    {
        return wbUserEntAuthMapper.deleteWbUserEntAuthByIds(ids);
    }

    /**
     * 删除登录用户和认证企业关联信息
     * 
     * @param id 登录用户和认证企业关联主键
     * @return 结果
     */
    @Override
    public int deleteWbUserEntAuthById(Long id)
    {
        return wbUserEntAuthMapper.deleteWbUserEntAuthById(id);
    }
}
